<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>百顺通云-后台用户管理</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- 公用CSS文件引入 -->
        <jsp:include page="../../admin/commonCSS.jsp"></jsp:include>
        
        <!-- 局部css -->
        <link href="/css/admin/productManager.css" rel="stylesheet" type="text/css"/>
 
    </head>
    <body class="skin-blue">
        
		<!-- 公用头部 -->
        <jsp:include page="../../admin/commonHeader.jsp"></jsp:include>
        
        <div class="wrapper row-offcanvas row-offcanvas-left">
            
            <!-- 公用导航 -->
            <jsp:include page="../../admin/commonMenu.jsp"></jsp:include>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>计费管理<small>计费管理列表</small></h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li>
                        <li class="active">计费管理</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content" id="feemanager">
			  		<!-- 操作 -->
			  		<div id="sec1">
	                    <div class="operator">
						  	<button type="button" class="btn btn-default addnew">新增</button>
						  	<button type="button" class="btn btn-default delete">删除</button>
						</div>
						<div class="bstable">
					  		<table class="table table-bordered" id="feetable">
						      <thead>
						        <tr>
						          <th>
								      <label class="icheck checkall">
								      	<input type="checkbox" class="simple">
								      	<span>全选</span>
								      </label>
						          </th>
						          <th>序号</th>
						          <th>计费模式</th>
						          <th class="filterctyth">
						          	<span class="filter filtercty">计费公式</span>
						          	<i class="fa fa-fw fa-sort-desc"></i>
						          </th>
						          <th>
-						          	<span class="filter filtername">计费基数</span>
-						          	<i class="fa fa-fw fa-sort-desc"></i>
-						          </th>
						          <th>
						          	<span class="filter filtertime">备注</span>
						          	<i class="fa fa-fw fa-sort-desc"></i>
						          </th>
						          <th>
						          	<span class="filter filternote">状态</span>
						          	<i class="fa fa-fw fa-sort-desc"></i>
						          </th>
						          <th>
						          	<span>操作</span>
						          </th>
						        </tr>
						      </thead>
						      <tbody>
							      <c:if test="${goodsFeeList.size() == 0}">
									<tr><td colspan="6">暂无数据，请添加过商品后再查看！</td></tr>
								  </c:if>
								  <c:if test="${goodsFeeList.size() != 0}">
									<c:forEach items="${goodsFeeList}" var="fee" varStatus="status">
										<tr>
								          <td>
										      <input type="checkbox" class="simple" data-id="${fee.goodsFeeId}">
								          </td>
								          <td>${ status.index + 1}</td>
								          <td>${fee.feeName}</td>
								          <td>${fee.feeFormula} * ${fee.feeBasenum}</td>
								          <td>${fee.feeBasenum}</td>
								          <td>${fee.remark}</td>
								          <td>
								          	<c:if test="${fee.state == 0}">启用</c:if>
								          	<c:if test="${fee.state == 1}">停用</c:if>
								          </td>
								          <td class="opration">
								          	<a href="javascript:void(0);" class="feemodelook">查看</a>
								          	<a href="javascript:void(0);" class="feemodeedit">编辑</a>
								          	<a href="javascript:void(0);" class="feemodedelete">删除</a>
								          	<c:if test="${fee.state == 0}">
								          		<a href="javascript:void(0);" class="feemodestop">停用</a>
								          	</c:if>
								          	<c:if test="${fee.state == 1}">
								          		<a href="javascript:void(0);" class="feemodestart">启用</a>
								          	</c:if>
								          	
								          </td>
								        </tr>
									</c:forEach>
								  </c:if>
						      </tbody>
						    </table>
				  		</div>
			  		</div>
			  		<div id="sec2" style="display:none;">
			  			<form class="form-horizontal" role="form">
							  <div class="form-group">
							    <label for="inputEmail3" class="col-sm-3 control-label">计费模式名称：</label>
							    <div class="col-sm-8">
							      <input type="text" class="form-control input-sm" id="feemodelname" placeholder="计费模式名称">
							    </div>
							  </div>
							 <div class="form-group" id="feemodel">
							    <label for="inputPassword3" class="col-sm-3 control-label">计算公式：</label>
							    <div class="col-sm-9">
							      <select class="form-control input-sm modelselect" style="width: 140px;display:inline-block;">
									  <option value="1">用户数 * 年限</option>
									  <option value="2">用户数</option>
									  <option value="3">年限</option>
								  </select>
								  <input type="number" name="jishu" class="form-control input-sm jishu"  style="width: 100px;display:inline-block; " placeholder="计费基数" />
							      <label style="color: #999;">
							      	公式：
							      </label>
							      <label id="modelpanel">
							      	用户数 * 年限
							      </label>
							    </div>
							  </div>
							  <div class="form-group feemodel_status">
							    <label class="col-sm-3 control-label">状态：</label>
							    <div class="col-sm-8">
									 <label><input type="radio" name="status" id="optionsRadios1" value="0" class="simple" checked>启用</label>
									 <label><input type="radio" name="status" id="optionsRadios2" value="1" class="simple">停用</label>
							    </div>
							  </div>
							  <div class="form-group">
							    <label class="col-sm-3 control-label">备注：</label>
							    <div class="col-sm-8">
									<textarea id="feemodelnote" class="form-control" rows="3"></textarea>
							    </div>
							  </div>
							  <div class="form-group">
							    <div class="col-sm-offset-4 col-sm-10" id="addfeemode">
							      <button type="button" class="btn btn-default confirm">确定</button>
							      <button type="button" class="btn btn-default cancel">取消</button>
							    </div>
							  </div>
							</form>
			  		</div>
			  		
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->
		<script type="text/javascript">
			var currentMenu = 'productManager';
		</script>
		<!-- 公用js文件引入 -->
        <jsp:include page="../../admin/commonJs.jsp"></jsp:include>

		<!-- 局部js文件 -->
		<script src="/js/admin/productManager/feemanager.js"></script>
    </body>
</html>